package TEST2;

public class Dog {

        private String name;
        private String color;
        private int age;
        public Dog(String name,String color,int age){
            this.name=name;
            this.color=color;
            this.age=age;
        }
        public void show(){
            System.out.println("狗的名字："+name);
            System.out.println("狗的颜色："+color);
            System.out.println("狗的年龄："+age);
        }
    }
    class DogText{
        public static void main(String args[]){
            Dog dog1=new Dog("来福","黑色",7);
            Dog dog2=new Dog("旺财","白色",3);
            dog1.show();
            dog2.show();
        }
    }

